package cn.ad.server.web.spring.service.components.http.client;

/**
 * 响应包装
 * @author wangwei
 *
 * @param <T>
 */
public class AdHttpResponse<T> {
	
	
    /** Name of the protocol. */
    protected String protocol;

    /** Major version number of the protocol */
    protected int major;

    /** Minor version number of the protocol */
    protected int minor;
	
	/**
	 * tells the length of the content, if known
	 * 
	 * the number of bytes of the content, or
     *          a negative number if unknown. If the content length is known
     *          but exceeds {@link java.lang.Long#MAX_VALUE Long.MAX_VALUE},
     *          a negative number is returned.
	 */
	private long length;
	/**
	 * entity解析后结果。
	 */
	private T result;
	/**
	 * 状态码
	 */
	private int statusCode = 404;
	/**
	 * 请求响应时长
	 */
	private long respTime = 0l;

	public T getResult() {
		return result;
	}

	public void setResult(T result) {
		this.result = result;
	}

	public int getStatusCode() {
		return statusCode;
	}

	public void setStatusCode(int statusCode) {
		this.statusCode = statusCode;
	}

	public long getLength() {
		return length;
	}

	public void setLength(long length) {
		this.length = length;
	}

	public String getProtocol() {
		return protocol;
	}

	public void setProtocol(String protocol) {
		this.protocol = protocol;
	}

	public int getMajor() {
		return major;
	}

	public void setMajor(int major) {
		this.major = major;
	}

	public int getMinor() {
		return minor;
	}

	public void setMinor(int minor) {
		this.minor = minor;
	}

	public long getRespTime() {
		return respTime;
	}

	public void setRespTime(long respTime) {
		this.respTime = respTime;
	}
	
	
}
